<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:s="http://jboss.com/products/seam/taglib">
<body>
    <ui:composition template="/WEB-INF/template.xhtml">
        <ui:define name="topnav">
            <ui:include src="/WEB-INF/incl/store_nav.xhtml">
                <ui:param name="page" value="cart" />
            </ui:include>
        </ui:define>

        <ui:define name="sidebar">
            <!--<ui:include src="/WEB-INF/incl/login.xhtml" />-->
            <ui:include src="/WEB-INF/incl/categories.xhtml" />
        </ui:define>

        <ui:define name="body">
            <f:subview id="no_order" rendered="#{completedOrder == null}">
                <p>Ваш заказ не может быть завершён.</p>
                <p><h:messages globalOnly="true" /></p>

                <h:form id="NoOrderForm">
                    <h:commandButton id="ContinueShoppingButton" action="browse" value="Continue Shopping" />
                </h:form>
            </f:subview>
            
            <f:subview id="orderdetail" rendered="#{completedOrder != null}">
                <h2>#{messages.checkoutCompleteHeader}</h2>

                <p>Номер вашего заказа: <span class="pricelabel">#{completedOrder.orderId}</span></p>
                <p>Сумма к оплате:<h:outputText value=" " /><h:outputText styleClass="pricelabel" value="#{completedOrder.totalAmount}">
                    <f:convertNumber type="currency" currencySymbol="руб." />
                </h:outputText></p>


                <p>←<s:link view="/browse.xhtml">Вернуться в магазин</s:link></p>
            </f:subview>
        </ui:define>
    </ui:composition>
</body>
</html>
